﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<cludg.Domain.Content.Stories.Offer>>" %>
<%@ Import Namespace="cludg.Domain.Content.Stories" %>
<%: Model.Count() < 1 ? "Нет предложений" : string.Empty %>
<% foreach (var offer in Model)
   { %>
<div class="offer-details-list-item">
	<% Html.RenderPartial("OfferDetailsControl", offer); %>
	<div class="offer-actions">
		<% if (offer.State != Offer.OfferState.Approved) %>
		<%{ %>
		<br />
		<%: Html.ActionLink("Принять...", "Approve", "Offer", new { id = offer.Id }, null)%>
		<%} %>
		<% if (offer.State == Offer.OfferState.Offered) %>
		<%{ %>
		<br />
		<%: Html.ActionLink("Отклонить...", "Decline", "Offer", new { id = offer.Id }, null)%>
		<% } %>
	</div>
</div>
<% } %>
